//
//  HMDateFormater.m
//  HMMeituanHD
//
//  Created by apple on 2017/5/20.
//  Copyright © 2017年 itheima. All rights reserved.
//

#import "HMDateFormater.h"

static HMDateFormater *_instance;

@implementation HMDateFormater


+ (instancetype)sharedIntance{

    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        _instance = [HMDateFormater new];
        //设置格式 2017-02-16
        [_instance setupDateFormatFromString:@"yyyy-MM-dd"];
    });
    
    return _instance;
}

//设置格式
- (void)setupDateFormatFromString:(NSString *)dateString{
    
    _instance.dateFormat = dateString;
}

@end
